#ifndef db_op_H
#define db_op_H

#include <variant>

#include <mysql.h>

#include "db_info.h"

class Database_Operater {
protected:
    std::variant<bool, uint64_t, std::pair<QueryResult,uint64_t>> result;

public:
    virtual void DatebaseOperation(MYSQL* db, const char* op) = 0;
    virtual uint64_t getUpdateResult() = 0;
    virtual std::pair<QueryResult,uint64_t> getQueryResult() = 0;
    virtual bool IsOperationSuccess() =0;
};



class Libaray_Operater : public Database_Operater {
public:
    void DatebaseOperation(MYSQL* db, const char* op) override;
    uint64_t getUpdateResult() override;
    std::pair<QueryResult,uint64_t> getQueryResult() override;
    bool IsOperationSuccess() override;


};


#endif










